package com.qianyu.project.service.impl;

import cn.hutool.core.date.DateUtil;
import com.qianyu.project.entity.LeasePayment;
import com.qianyu.project.mapper.LeasePaymentMapper;
import com.qianyu.project.service.ILeasePaymentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 租赁付款 服务实现类
 * </p>
 *
 * @author gs
 * @since 2021-01-30
 */
@Service
public class LeasePaymentServiceImpl extends ServiceImpl<LeasePaymentMapper, LeasePayment> implements ILeasePaymentService {

    @Autowired
    LeasePaymentMapper leasePaymentMapper;
    @Override
    public String getMaxid() {
        String maxid = leasePaymentMapper.getMaxid();
        if(maxid == null){
            maxid = DateUtil.today().replaceAll("-", "") + "000";
        }
        return maxid;
    }
}
